(include "class/hmap/class.inc")

(def-class view hmap
	(dec-method :vtable gui/view/vtable)
	(dec-method :create gui/view/create :static () (:r0))
	(dec-method :init gui/view/init :static (:r0 :r1))
	(dec-method :add_front gui/view/add_front :static (:r0 :r1) (:r0))
	(dec-method :add_back gui/view/add_back :static (:r0 :r1) (:r0))
	(dec-method :sub gui/view/sub :static (:r0) (:r0))
	(dec-method :hide gui/view/hide :static (:r0) (:r0))
	(dec-method :to_front gui/view/to_front :static (:r0) (:r0))
	(dec-method :to_back gui/view/to_back :static (:r0) (:r0))
	(dec-method :forward_tree gui/view/forward_tree :static (:r0 :r1 :r2 :r3) (:r0))
	(dec-method :backward_tree gui/view/backward_tree :static (:r0 :r1 :r2 :r3) (:r0))
	(dec-method :hit_tree gui/view/hit_tree :static (:r0 :r7 :r8) (:r0 :r1 :r7 :r8))
	(dec-method :find_id gui/view/find_id :static (:r0 :r1) (:r0 :r1))
	(dec-method :set_flags gui/view/set_flags :static (:r0 :r1 :r2) (:r0 :r1))
	(dec-method :get_prop gui/view/get_prop :static (:r0 :r1) (:r0 :r1))
	(dec-method :ref_prop gui/view/ref_prop :static (:r0 :r1) (:r0 :r1))
	(dec-method :get_long_prop gui/view/get_long_prop :static (:r0 :r1) (:r0 :r1))
	(dec-method :forward_tree_callback class/obj/null :static (:r0 :r1) (:r0 :r1))
	(dec-method :deinit gui/view/deinit :override)
	(dec-method :draw class/view/draw :virtual (:r0) (:r0))
	(dec-method :hit gui/view/hit :virtual (:r0 :r7 :r8) (:r0 :r1))
	(dec-method :lisp_create gui/view/lisp_create :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_sub gui/view/lisp_sub :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_hide gui/view/lisp_hide :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_add gui/view/lisp_add :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_add_back gui/view/lisp_add_back :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_clr_opaque gui/view/lisp_clr_opaque :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_add_opaque gui/view/lisp_add_opaque :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_sub_opaque gui/view/lisp_sub_opaque :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_set_flags gui/view/lisp_set_flags :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_trans_dirty gui/view/lisp_trans_dirty :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_add_dirty gui/view/lisp_add_dirty :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_find_id gui/view/lisp_find_id :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_children gui/view/lisp_children :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_flatten gui/view/lisp_flatten :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_hit_tree gui/view/lisp_hit_tree :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_to_front gui/view/lisp_to_front :static (:r0 :r1) (:r0 :r1))
	(dec-method :lisp_to_back gui/view/lisp_to_back :static (:r0 :r1) (:r0 :r1)))

(def-struct view hmap_size
	(offset start)
	(struct node ln_node_size)
	(struct list lh_list_size)
	(struct owner_id net_id_size)
	(ptr dirty_region opaque_region ctx_node)
	(long id)
	(uint flags)
	(int ctx_x ctx_y x y w h cw ch))

;view flags
(def-bit view_flag 0
	(bit solid opaque dirty_all hidden at_back at_front subtree))
